package com.xlserver.domain;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.security.SecureRandom;
import java.util.Date;

@Data
@TableName("consultation_text_history")
public class Message {
    @TableField("hid")
    private Integer hid;

    @TableField("hSenderId")
    private int senderId;

    @TableField("hReceiverId")
    private int receiverId;

    @TableField("hTextTime")
    private Date time;

    @TableField("hTextMessage")
    private String msg;

    @TableField("hSign")
    private int sign;

    public Message(){}

    public Message(int senderId, int receiverId, int hid, String msg){
        this.setMsg(msg);
        this.setReceiverId(receiverId);
        this.setSenderId(senderId);
        this.setHid(hid);
    }

    public Message(Integer hid, int senderId, int receiverId, String msg, int sign) {
        this.hid = hid;
        this.senderId = senderId;
        this.receiverId = receiverId;
        this.msg = msg;
        this.sign = sign;
    }
}
